package com.yan.demo;

 public class Phone {
    private String brand;
    private int price;
    private String color;

    // 提供空参变量
    public Phone(){

    }

    // 提供有参变量
    public Phone(String brand , int price , String color){
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    // 提供set/get方法
    public String getBrand(){
        return brand;
    }

    public void setBrand(String brand){
        this.brand = brand;
    }

    public void setPrice(int price){
        this.price = price;
    }

    public void setColor(String color){
        this.color = color;
    }

    public String getColor(){
        return color;
    }

    public int getPrice(){
        return price;
    }
    // 打电话方法
    public void call(){
        System.out.println("正在使用价格为" + price + color +"的" + brand + "打电话。。。");
    }

    public void sendMessage(){
        System.out.println("正在使用价格为" + price + color +"的" + brand + "发短信。。。");
    }

}

